<extend name="./Application/Admin/View/common/base.html" />
<block name="crumb">
    <span class="c-gray en">&gt;</span> 退货原因管理
    <span class="c-gray en">&gt;</span> 退货原因列表
</block>
<block name="content">
    <div class="cl pd-5 bg-1 bk-gray mt-20"> <span class="l"><a href="{:U('ReturnGood/addReason')}" class="btn btn-primary radius"><i class="Hui-iconfont"></i> 添加退款原因</a></span>  </div>

    <div class="mt-10">
        <table class="table table-border table-bordered table-bg table-sort">
            <thead>
            <tr class="text-c">
                <th width="70">ID</th>
                <th width="460">退款原因</th>
                <th>添加时间</th>
                <th>操作 </th>
            </tr>
            </thead>
            <tbody>
            <volist name="returnReason" id="reason" key="k" >
                <tr class="text-c">
                    <td>{$k}</td>
                    <td>{$reason['reason']}</td>
                    <td>{$reason['now_time']|date="Y-m-d H:i:s",###}</td>
                    <td class="f-14 product-brand-manage">
                        <a href="{:U('ReturnGood/editReason', array('id'=>$reason['id']))}" class="btn btn-secondary radius size-MINI"><i class="Hui-iconfont Hui-iconfont-edit"></i>修改</a>
                        <a href="javascript:;" class="btn btn-danger radius size-MINI del" iid="{$reason['id']}"><i class="Hui-iconfont Hui-iconfont-del2"></i>删除</a>
                    </td>
                </tr>
            </volist>
            </tbody>
        </table>
    </div>
    <div class="page" style="margin-top: 10px;">{$page}</div>
</block>
<block name="js">
    <script type="text/javascript" src="__PUBLIC__/Admin/static/ext/js/zoomify.js"></script>
    <script type="text/javascript">
        $('.large_img').zoomify();
        $(function () {
            $('.del').click(function () {
                var _this = $(this);
                layer.confirm('您确认删除此数据吗？', {
                    btn: ['确认','取消']
                }, function(){
                    $.ajax({
                        url: "{:U('ReturnGood/delReason')}",
                        type: "post",
                        data: {
                            id: _this.attr('iid')
                        },
                        beforeSend: function () {
                            layer.msg('删除操作中..', {icon: 16,time:500});
                        },
                        success: function (msg) {
                            window.location.href = "{:U('ReturnGood/reason')}";
                        }
                    });
                });
            });
        });

    </script>
</block>



